1. Field of the Invention
The present invention relates to a microprocessor.
2. Description of the Related Art
In a micro-processor, flow controls such as IF, JUMP, GO TO, and so on are performed with reference to external input signals, states of flags or the like in an arithmetic logic unit (ALU).
FIG. 1 is a diagram illustrating the basic structure of a micro-processor unit (MPU) of a conventional micro-programming type, only showing constituents particularly related to the invention.
In FIG. 1, address data indicated by a program counter 22 in a sequencer 21 of an execution control unit 20 is outputted as an operation instruction to an ALU 24 by a micro-program 23. From the micro-program 23, in addition to this operation instruction, data to be operated is delivered to a bus 25 and a predetermined control signal is outputted to the outside of the micro processor.
An operation result of the ALU 24 is inputted to the sequencer 21 or delivered to the bus 25 in order to utilize it. The sequencer 21 is also provided with flag information indicative of an operating state of the ALU or the like, information from the outside, and flow control information from the micro-program 23, in addition to the operation result. With this information, the execution of the sequencer 21 is controlled.
The flow control of the micro-program 23 is performed by changing an instruction execution destination in accordance with the contents and type of an external interrupt signal, and a flag associated with the operation result of the ALU 24. Particularly, the flow control, when performed on the basis of data, is carried out in accordance with the operation result of the ALU 24.
However, since a conventional micro-processor can only compare one pattern at a time with respect to the operation result of the ALU 24, many comparisons would be very time consuming.
Also, a method using a multiple branch may be thought of as a flow control method. However, with comparison of 32-bit data, for example, more than 4 billion of flow controls are theoretically possible so that an address space for them must be reserved, which is not practical.
Particularly, in a micro-processor which is required to have the real time performance, a condition comparison cannot be performed with data of a large bit width.